<%-- 
    Document   : homepage
    Created on : Jan 14, 2013, 9:28:07 PM
    Author     : KAKAIT
--%>

<%@page import="java.text.DateFormat"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="model.entity.Product"%>
<%@page import="java.util.List"%>
<%@page import="model.ProductImp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
    <title>Demo</title>
    </head>
    <body>
        <%
            Date date = new Date();
        SimpleDateFormat sdf;
        sdf = new SimpleDateFormat("hh:mm:ss");
        System.out.println(sdf.format(date));
        SimpleDateFormat sdf1 = new SimpleDateFormat("dd MMM yyyy hh:mm:ss zzz");
        System.out.println(sdf1.format(date));
        SimpleDateFormat sdf2 = new SimpleDateFormat("E MMM dd yyyy");
        System.out.println(sdf2.format(date));
        DateFormat df = DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.MEDIUM);
        %>
        <input value="<%= sdf.format(date) %>" /><br/>
        <input value="<%= sdf1.format(date) %>" /><br/>
        <input value="<%= sdf2.format(date) %>" /><br/>
        <input value="<%= df.format(date.getTime()) %>" /><br/>
    </body> 
</html>